home *** CD-ROM | disk | FTP | other *** search
- ; An Example of pasting data to a DOS window
- ; We will paste DIR and CHKDSK, PAUSE and EXIT to as DOS window
-
-
- if !(WinConfig() & 32) then goto NOGO ; Check for 386 enhanced mode
-
- Pause("Please Note:","This WBT file starts a command.com window. Type EXIT to close the window.")
- ReturnKey=Strcat(num2char(13))
- CommandToType="DIR %ReturnKey% CHKDSK %ReturnKey%"
- ClipPut(CommandToType)
- RunIcon(Environment("COMSPEC"),"") ;Get command.com from COMSPEC in environment
- WinActivate("COMMAND")
- SendKey("! TW~") ;Sendkey to set "windowed" mode...not full screen
- WinShow("COMMAND")
- SendKey("! EP") ; SendKey Alt-Space Edit Paste
- Exit
-
-
- :NOGO
- Message("Ooops!","Can only paste to DOS apps when in 386 enhanced mode")
-